<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/style/cssMain.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/style/jQuery.js"></script>
    <script type="text/javascript" src="/style/jsMain.js"></script>
  </head>
  
  <body>
    <div id="eBody">
      <div class="eTitle">街道申请管理</div>
      <div class="eTool">
        <ul>
          <li><a href="javascript:" onClick="selectID(1)">选择所有</a></li>
          <li><a href="javascript:" onClick="selectID(0)">取消</a></li>
        </ul>
        <ul>
          <li><a href="javascript:" onClick="submitAll('<?php echo site_url('mang/applystreet/delete'); ?>')">删除</a></li>
        </ul>
        <ul class="eSearch">
          <form action="<?php echo site_url('mang/applystreet'); ?>" method="get">
          <li><input name="search" type="text" class="text" value="<?php echo $eSearch?>"></li>
          <li><input name="" type="submit" value="搜索" class="button"></li>
          </form>
        </ul>
      </div>
      <div class="eTag">
        <ul>
          <li class="eSelected"'><a href="<?php echo site_url('mang/applystreet'); ?>">所有内容</a></li>
        </ul>
      </div>
      <div class="eSheet eBorder">
        <?php if(1 > 0): ?>
        <form id="Romeo" method="post">
        <div class="eList">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr class="title">
              <td width="1"></td>
              <td>街道名称</td>
              <td align="right" width="100">街道编号</td>
              <td align="right" width="100">联系电话</td>
              <td align="right" width="60">申请状态</td>
              <td align="right" width="80">申请人</td>
              <td align="right" width="80">申请时间</td>
            </tr> 
		  <?php foreach($applyList as $item): ?>           
            <tr>
              <td width="1"><input id="checkID" name="checkID[]" type="checkbox" value="<?php echo $item->id; ?>"></td>
              <td class="title"><?php echo $item->name ?></td>
              <td align="right" width="100"><?php echo $item->code; ?> </td>
              <td align="right" width="100"><?php echo $item->phone; ?> </td>
              <td align="right" width="100"><?php echo $item->status; ?> </td>
              <td align="right" width="60"><?php echo $item->applyuname; ?></td>
              <td align="right" width="100"><?php echo date('Y-m-d', $item->applytime); ?></td>
            </tr>
            <tr class="border">
              <td colspan="8">
              	<?php if($item->status == 1):?>
              		是否通过：
              		<a href="<?php echo site_url('mang/applystreet/status')?>?id=<?php echo $item->id;?>&status=2" name="apply">是</a>
              		<a href="<?php echo site_url('mang/applystreet/status')?>?id=<?php echo $item->id;?>&status=3" name="apply">否</a>
              	<?php endif?>
			    <a name='delete' href="<?php echo site_url('mang/applystreet/delete')?>?id=<?php echo $item->id;?>" onclick="delete">删除</a>
              </td>
            </tr>      
          <?php endforeach; ?>
          </table>
		 
        </div>
        </form>
        <?php else: ?>
        <div style="color: #C30; height: 35px; line-height: 35px;">Not found</div>
        <?php endif; ?>
      </div>
      <div class="eTool">
        <?php echo $this->pagination->create_links(); ?>
        <ul>
          <li>About <strong><?php echo $eCount; ?></strong> results ({elapsed_time} seconds)</li>
        </ul>
      </div>
    </div>
  </body>
  <script>
  	$(function(){
  		$("a[name='apply']").click(function(){
  		    if(confirm("确定该操作吗？") == true) return true;  
  			else return false;  
  		  });
  	  	})
  </script>
</html>
